home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows4 / pcproj.zip / PROJDIAL.CLS < prev    next >
Text File  |  1988-11-22  |  1KB  |  44 lines

  1. /* For editing project information.
  2.    This class descends from class ActivDialog and inherits
  3.    all of its data and operations.  As such, the edit item
  4.    is called activity, even though it is really a project.
  5. */!!
  6.  
  7. inherit(ActivDialog, #ProjDialog, nil, 2, nil)!!
  8.  
  9. now(ProjDialogClass)!!
  10.  
  11. now(ProjDialog)!!
  12.  
  13. /* Update the edit item (activity) after Ok was pressed. */
  14. Def  update(self | ues, ulf)
  15. {
  16.   ues := checkDate(getItemText(self, UES));
  17.   ulf := checkDate(getItemText(self, ULF));
  18.   if not(ues)
  19.     ues := date(1,1,1988);
  20.   endif;
  21.   setValues(activity, tuple(
  22.       getItemText(self, NAME),
  23.       getItemText(self, DESC),
  24.       ues,
  25.       ulf));
  26. } !!
  27.  
  28. /* Return the resource ID that should be used with this
  29.    dialog box. */
  30. Def  res(self)
  31. {
  32.   ^PROJ_BOX;
  33. }!!
  34.  
  35. /* Initialize the dialog so all fields have the correct values. */
  36. Def initDialog(self, wp, lp)
  37. {
  38.   initDialog(self:ActivDialog, wp, lp);   /* ancestor init */
  39.   setItemText(self, TIME, asString(getTime(activity)));
  40.   setItemText(self, COST, asString(getCost(activity)));
  41. }
  42. !!
  43.  
  44.